require('YZMSeverTimeService,NSDate,DTTimePeriod,YZMStockRealModel');
    
defineClass("YZMStockSellNewCell:UITableViewCell", {
    
setRealRecord: function(realRecord) {
        
        self.ORIGsetRealRecord(realRecord);

        var year = YZMSeverTimeService.sharedService().severDate().formattedDateWithFormat("yyyy").integerValue();
        var month = YZMSeverTimeService.sharedService().severDate().formattedDateWithFormat("MM").integerValue();
        var day = YZMSeverTimeService.sharedService().severDate().formattedDateWithFormat("dd").integerValue();

        var beginDate = NSDate.dateWithYear_month_day_hour_minute_second(year, month, day, 9, 0, 0);
        var endDate = NSDate.dateWithYear_month_day_hour_minute_second(year, month, day, 9, 30, 0);

        var timePeriod = DTTimePeriod.timePeriodWithStartDate_endDate(beginDate, endDate);

        if (!timePeriod.containsDate_interval(YZMSeverTimeService.sharedService().severDate(), 1) && realRecord.isSuspended()) {

            self.stopView().setHidden(NO);
            self.stopFlagView().setHidden(NO);
            self.statusLB().setHidden(YES);
        }
    },
});

defineClass("YZMStockSellCell:UITableViewCell", {
    
    setRealRecord: function(realRecord) {
        
        self.ORIGsetRealRecord(realRecord);

        var year = YZMSeverTimeService.sharedService().severDate().formattedDateWithFormat("yyyy").integerValue();
        var month = YZMSeverTimeService.sharedService().severDate().formattedDateWithFormat("MM").integerValue();
        var day = YZMSeverTimeService.sharedService().severDate().formattedDateWithFormat("dd").integerValue();

        var beginDate = NSDate.dateWithYear_month_day_hour_minute_second(year, month, day, 9, 0, 0);
        var endDate = NSDate.dateWithYear_month_day_hour_minute_second(year, month, day, 9, 30, 0);

        var timePeriod = DTTimePeriod.timePeriodWithStartDate_endDate(beginDate, endDate);

        if (!timePeriod.containsDate_interval(YZMSeverTimeService.sharedService().severDate(), 1) && realRecord.isSuspended()) {

            self.stopView().setHidden(NO);
            self.stopFlagView().setHidden(NO);
            self.statusLB().setHidden(YES);
        }
    },
});